Building the CygNet Bridge API Sample Web Application

Once you have installed CygNet Bridge along with the Bridge API feature, you may want to build the sample application to help you begin using the CygNet Bridge API to create your custom web application to securely access your CygNet data.

Build the Sample Web Application

The sample web application is included with the CygNet Bridge API feature, and provides usage examples you can use as a reference or starting point when developing your custom web application. The sample application source files are located in the BridgeAPISampleApp\sample folder in your CygNet Bridge product deliverable. Once built, the sample provides you with examples of the structure and capabilities of the APIs and demonstrates how to build calls to interact with CygNet Bridge APIs, including a sample using two-factor authentication (optional, but recommended).

The sample app provided is for an Angular web application. The sample application must first be compiled, before you will be able to view it in a web browser. Angular CLI is a (command line interface) tool used for compiling and building Angular web applications. Angular uses npm software as a package-manager (command line client) tool to manage JavaScript web application libraries. You can obtain current versions of these tools via web downloads, as described in the following procedure.

To Build the CygNet Bridge API Sample Web Application

Note: Your web server requires an active internet connection for you to access the sample web application.

Complete the following steps to build your sample web application.

  1. Install or verify the supporting software used to deliver the sample web application. Comply with any listed prerequisites for your development environment.
    1. Install npm software or verify that it is already installed on your system. Refer to npm online documentation for current download and installation information, if needed.
    2. Install Angular CLI software or verify that it is already installed on your system. Refer to Angular CLI online documentation for current download and installation information, if needed.
  1. In your CygNet Bridge source files, locate the source code for the CygNet Bridge API sample web application as follows.
    1. Open the BridgeAPISampleApp folder.
    2. Copy the sample folder and its contents to a folder on your hard drive.
  1. Open a Windows command prompt pointing to the sample folder location you created for the copied files.
    1. Type the command npm install to download and install all of the required dependencies.
    2. Type the command npm start to compile the application and start a test development server on port 4200.
  1. To test the application, open a web browser using the address https://localhost:4200

CygNetBridgeSampleApp on GitHub

The CygNet Bridge API sample web application provides source code that demonstrates using the API to retrieve data from your CygNet system is also available on GitHub. Refer to CygNetBridgeSampleApp for more information.

Back to top